
var speed:float = 10;
var counter:int = 0;
var counterMax:int = 100;
var stage:int = 0;

function Update () {
	
	if(stage == 0){
		transform.Translate(Vector3.up * Time.deltaTime * speed);
	} else if(stage == 1){
		transform.Translate(Vector3.left * Time.deltaTime * speed);
	} else if(stage == 2){
		transform.Translate(Vector3.down * Time.deltaTime * speed);
	} else if(stage == 3){
		transform.Translate(Vector3.right * Time.deltaTime * speed);
	}
		
	if(counter > counterMax)
	{
	print("Counter Reset");
		counter = 0;
		stage++;
		
		if(stage > 3)
		{
		print("Stage Reset");
			stage = 0;
		}
	}
	
	counter++;
}